package com.huangliusong.context;

import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

/**
 * @author huangliusong
 * @since 2018/9/30
 * {@link Order }
 */
@Order(Ordered.HIGHEST_PRECEDENCE)
public class HelloWorld<C extends ConfigurableApplicationContext> implements ApplicationContextInitializer<C> {
    @Override
    public void initialize(C applicationContext) {
        System.err.println("高优先级:"+applicationContext.getId());
    }
}

